using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

using SBPweb.Modules.Smartparts;


namespace SBPweb.Presentation.Windows.Forms.Controls
{

    public class LabelItemControl : ToolStripLabel, IMenuItem
    {
        public LabelItemControl()
        {
            base.Click += new EventHandler(ItemControl_Click);
            base.MouseEnter += new EventHandler(ItemControl_MouseEnter);
        }

        void ItemControl_MouseEnter(object sender, EventArgs e)
        {
            if (Selected != null)
            {
                Selected(this, new MenuEventArgs(this));
            }
        }

        void ItemControl_Click(object sender, EventArgs e)
        {
            if (Pressed != null)
            {
                Pressed(this, new MenuEventArgs(this));
            }
        }

        #region IMenuItem Members

        public new event EventHandler<MenuEventArgs> Pressed;

        public new event EventHandler<MenuEventArgs> Selected;

        #endregion

    }
}
